package com.lyn.tool.mvp.presenter;

import com.lyn.tool.mvp.contract.MainContract;
import com.lyn.tool.mvp.other.ExecutorAsyncTask;;
import com.lyn.tool.mvp.model.MainModel;


public class MainPresenter implements MainContract.Presenter {

    private final MainModel mainModel;
    private final MainContract.View view;

    public MainPresenter(MainContract.View view) {
        this.mainModel = new MainModel();
        this.view = view;
    }


    @Override
    public void init() {
        ExecutorAsyncTask.newExecutor(view, mainModel::init);
    }

    @Override
    public void loadPlugin(String apkPath) {
        ExecutorAsyncTask.newExecutor(view, () -> mainModel.loadPlugin(apkPath));
    }


}
